#include"sharemem.hpp"
#include"Time.hpp"
#include<string.h>
#include"Fifo.hpp"


int main()
{
    mem.GetShm();
    mem.AttachShm();
    fifo.Fifoforwrite();
    struct data* image = (struct data*)mem.GetAddr();
    int i = 10;
    while(i--)
    {
        strcpy(image->status, "最新");
        strcpy(image->lasttime, GetCurrTime().c_str());
        strcpy(image->image, "**********************");
        sleep(3);
        fifo.signal();
    }
    mem.DetachShm();
    mem.DeleteShm();
    return 1;

}